<?php
class AgentAccount {

    /**
     * Get shipping method setting.
     *
     * @desc about this setting, you can browse backend/application/constants/OrderConstant.php
     * @param int $int_index
     * @return array|string
     */
    public static function getShippingMethod( $int_index = null ){
        $arr_setting = array(
            1 => OPSHIPPINGMETHOD1,
            2 => OPSHIPPINGMETHOD2,
            3 => OPSHIPPINGMETHOD3,
            4 => OPSHIPPINGMETHOD4,
            5 => OPSHIPPINGMETHOD5,
            6 => OPSHIPPINGMETHOD6,
            7 => OPSHIPPINGMETHOD7,
            8 => OPSHIPPINGMETHOD8 
        );
        if( empty( $int_index ) )
            return $arr_setting;
        else
            return $arr_setting[$int_index];
    }

    /**
     * Get `account_agent_trade_logs`.`trade_type` setting
     *
     * @param int $int_key
     * @return array|string
     */
    public function getAgentAccountTradeType( $int_key = null ){

        $arr_setting = array(
            1 => AATLTRADETYPELIST1,
            2 => AATLTRADETYPELIST2,
            3 => AATLTRADETYPELIST3,
            11 => AATLTRADETYPELIST11,
            12 => AATLTRADETYPELIST12,
            13 => AATLTRADETYPELIST13,
            14 => AATLTRADETYPELIST14,
            15 => AATLTRADETYPELIST15,
            21 => AATLTRADETYPELIST21,
            22 => AATLTRADETYPELIST22,
            23 => AATLTRADETYPELIST23,
            24 => AATLTRADETYPELIST24,
            25 => AATLTRADETYPELIST25,
            31 => AATLTRADETYPELIST31,
            32 => AATLTRADETYPELIST32,
            33 => AATLTRADETYPELIST33,
            34 => AATLTRADETYPELIST34,
            35 => AATLTRADETYPELIST35,
            100 => AATLTRADETYPELIST100
        );

        if( empty( $int_key ) )
            return $arr_setting;
        if( empty( $arr_setting[$int_key] ) )
            return false;
        return $arr_setting[$int_key];

    }

    /**
     * Get `account_agent_trade_logs`.`withdraw_type` setting
     *
     * @author by M.Wang
     * @param int $int_key
     * @return array|string
     */
    public static function getAgentAccountWithdrawType( $int_key = null ){
        $arr_setting = array(
            0 => AATLWITHDRAWTYPELIST0,
            1 => AATLWITHDRAWTYPELIST1,
            2 => AATLWITHDRAWTYPELIST2,
            3 => AATLWITHDRAWTYPELIST3,
            11 => AATLWITHDRAWTYPELIST11,
            12 => AATLWITHDRAWTYPELIST12,
            13 => AATLWITHDRAWTYPELIST13,
            14 => AATLWITHDRAWTYPELIST14,
            15 => AATLWITHDRAWTYPELIST15,
            16 => AATLWITHDRAWTYPELIST16,
            17 => AATLWITHDRAWTYPELIST17,
            18 => AATLWITHDRAWTYPELIST18,
            19 => AATLWITHDRAWTYPELIST19,
            20 => AATLWITHDRAWTYPELIST20,
            21 => AATLWITHDRAWTYPELIST21,
            22 => AATLWITHDRAWTYPELIST22,
            23 => AATLWITHDRAWTYPELIST23,
            24 => AATLWITHDRAWTYPELIST24,
            25 => AATLWITHDRAWTYPELIST25
        );

        if( empty( $int_key ) )
            return $arr_setting;
        if( empty( $arr_setting[$int_key] ) )
            return false;
        return $arr_setting[$int_key];

    }

    /**
     * Get `account_agent_trade_logs`.`supplement_type` setting
     *
     * @author by M.Wang
     * @param int $int_key
     * @return array|string
     */
    public static function getAgentAccountSupplementType( $int_key = null ){

        $arr_setting = array(
            0 => AATLSUPPLEMENTTYPELIST0,
            1 => AATLSUPPLEMENTTYPELIST1,
            2 => AATLSUPPLEMENTTYPELIST2,
            3 => AATLSUPPLEMENTTYPELIST3,
            11 => AATLSUPPLEMENTTYPELIST11,
            12 => AATLSUPPLEMENTTYPELIST12,
            13 => AATLSUPPLEMENTTYPELIST13,
            14 => AATLSUPPLEMENTTYPELIST14,
            15 => AATLSUPPLEMENTTYPELIST15,
            16 => AATLSUPPLEMENTTYPELIST16,
            17 => AATLSUPPLEMENTTYPELIST17,
            18 => AATLSUPPLEMENTTYPELIST18,
            19 => AATLSUPPLEMENTTYPELIST19,
            20 => AATLSUPPLEMENTTYPELIST20,
            21 => AATLSUPPLEMENTTYPELIST21,
            22 => AATLSUPPLEMENTTYPELIST22,
            23 => AATLSUPPLEMENTTYPELIST23,
            24 => AATLSUPPLEMENTTYPELIST24,
            25 => AATLSUPPLEMENTTYPELIST25
        );

        if( empty( $int_key ) )
            return $arr_setting;
        if( empty( $arr_setting[$int_key] ) )
            return false;
        return $arr_setting[$int_key];

    }

    /**
     * get `account_agent_trade_logs`.`status` setting
     *
     * @author by M.Wang
     * @param int $int_key
     * @return array|string
     */
    public static function getAgentAccountTradeLogStatus( $int_key = null ){

        $arr_setting = array(
            0 => AATLSTATUSLIST0,
            1 => AATLSTATUSLIST1,
            2 => AATLSTATUSLIST2,
            3 => AATLSTATUSLIST3,
            4 => AATLSTATUSLIST4,
            5 => AATLSTATUSLIST5,
            6 => AATLSTATUSLIST6,
            7 => AATLSTATUSLIST7
        );

        if( empty( $int_key ) )
            return $arr_setting;
        if( empty( $arr_setting[$int_key] ) )
            return false;
        return $arr_setting[$int_key];

    }

    public static function getAlipayInfo(){
        $partner = "2088001952975710";//合作伙伴ID
        $security_code = "8jzu98h5qj00bg6w44rptwcixx8gphzg";//安全检验码
        $seller_email = "pay@akimimi.com";//卖家邮箱
        $_input_charset = "gb2312"; //字符编码格式  目前支持 GBK 或 utf-8
        $sign_type = "MD5"; //加密方式  系统默认(不要修改)
        $transport= "https";//访问模式,你可以根据自己的服务器是否支持ssl访问而选择http以及https访问模式(系统默认,不要修改)
        $notify_url = "http://".$_SERVER[SERVER_NAME]."/o/supplychangetotal";// 异步返回地址
        $return_url = "http://".$_SERVER[SERVER_NAME]."/o/supplysuccess"; //同步返回地址
        $show_url   ="http://www.akimimi.com";  //你网站商品的展示地址,可以为空;
        $pra=array(
        'partner'=>$partner,
        'security_code'=>$security_code,
        'seller_email'=>$seller_email,
        'input_charset'=>$_input_charset,
        'sign_type'=>$sign_type,
        'transport'=>$transport,
        'notify_url'=>$notify_url,
        'return_url'=>$return_url,
        'show_url'=>$show_url
        );
        return $pra;
    }

}

?>
